package org.jeecg.modules.api.task;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.api.member.service.IMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 用户等级计算任务
 *
 * */
@Component
@Slf4j
public class UserLevelTask {

    @Autowired
    private IMemberService memberService;

    /**
     * 用户等级定时任务
     * */
//    @Scheduled(cron="0/30 * * * * *")
    public void levelTask(){
        try {
            log.info("levelTask.............");
            memberService.updateLevelTask();
        }catch (Exception e){
            log.error("levelTask:{}",e);
        }
    }

}
